﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WisDom.SmartTMS.Entity;

namespace WisDom.SmartTMS.Validator
{
    /// <summary>
    /// 用户的验证器
    /// </summary>
    public class UsersValidator : IEntityTypeConfiguration<Users>
    {
        public void Configure(EntityTypeBuilder<Users> builder)
        {
            builder.ToTable("Users");
            builder.Property("UserNo").HasMaxLength(50).IsRequired();
            builder.Property("UserName").HasMaxLength(50).IsRequired();
            builder.Property<int>("RoleId").HasColumnType("int").IsRequired();
            builder.Property("PassWord").HasMaxLength(50).IsRequired();
        }
    }
}
